clear
log using "e:\FIS_duration\mean_turn_matched_stocks2_rep.log"
infix nep 2-5 perm 7-11 date 13-20 exch 22-22 fee 24-33 size 35-46 price 48-56 turn 58-66 mperm 68-72 msize 74-85 mprice 87-95 mturn 108-116 type 118-118 using "e:\FIS_duration\episode_data_matched_turn_type_rep.txt"
gen turndif = turn - mturn
sort nep date
statsby mean=r(mean), by(nep) saving(e:\Fis_duration\mean_turn_stats2_rep): summarize turn
statsby mean=r(mean), by(nep) saving(e:\Fis_duration\mean_mturn_stats2_rep): summarize mturn
statsby mean=r(mean), by(nep) saving(e:\Fis_duration\mean_diff_turn_stats2_rep): summarize turndif
statsby mean=r(mean) if type == 1, by(nep) saving(e:\Fis_duration\mean_turn_stats2_type1_rep): summarize turn
statsby mean=r(mean) if type == 1, by(nep) saving(e:\Fis_duration\mean_mturn_stats2_type1_rep): summarize mturn
statsby mean=r(mean) if type == 1, by(nep) saving(e:\Fis_duration\mean_diff_turn_stats2_type1_rep): summarize turndif
statsby mean=r(mean) if type == 2, by(nep) saving(e:\Fis_duration\mean_turn_stats2_type2_rep): summarize turn
statsby mean=r(mean) if type == 2, by(nep) saving(e:\Fis_duration\mean_mturn_stats2_type2_rep): summarize mturn
statsby mean=r(mean) if type == 2, by(nep) saving(e:\Fis_duration\mean_diff_turn_stats2_type2_rep): summarize turndif
statsby mean=r(mean) if type == 3, by(nep) saving(e:\Fis_duration\mean_turn_stats2_type3_rep): summarize turn
statsby mean=r(mean) if type == 3, by(nep) saving(e:\Fis_duration\mean_mturn_stats2_type3_rep): summarize mturn
statsby mean=r(mean) if type == 3, by(nep) saving(e:\Fis_duration\mean_diff_turn_stats2_type3_rep): summarize turndif
clear
use "E:\FIS_duration\mean_turn_stats2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_mturn_stats2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_diff_turn_stats2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_turn_stats2_type1_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_mturn_stats2_type1_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_diff_turn_stats2_type1_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_turn_stats2_type2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_mturn_stats2_type2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_diff_turn_stats2_type2_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_turn_stats2_type3_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_mturn_stats2_type3_rep.dta"
summarize, detail
clear
use "E:\FIS_duration\mean_diff_turn_stats2_type3_rep.dta"
summarize, detail
clear

log close